package org.pushingpixels.aurora.demo.svg.tango

import androidx.compose.ui.geometry.*
import androidx.compose.ui.graphics.*
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.Fill
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.graphics.drawscope.clipRect
import androidx.compose.ui.graphics.drawscope.translate
import androidx.compose.ui.graphics.drawscope.withTransform
import androidx.compose.ui.graphics.painter.Painter
import java.lang.ref.WeakReference
import java.util.*
import kotlin.math.min

/**
 * This class has been automatically generated using
 * <a href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
 */
class preferences_desktop_font : Painter() {
    @Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
    @Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
    @Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
    @Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
    @Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
    private var alpha = 1.0f
    private var blendMode = DrawScope.DefaultBlendMode
    private var alphaStack = mutableListOf(1.0f)
    private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)

	@Suppress("UNUSED_VARIABLE", "UNUSED_VALUE", "VARIABLE_WITH_REDUNDANT_INITIALIZER", "UNNECESSARY_NOT_NULL_ASSERTION")
private fun _paint0(drawScope : DrawScope) {
var shapeText: Outline?
var generalPathText: Path? = null
var alphaText = 0.0f
var blendModeText = DrawScope.DefaultBlendMode
with(drawScope) {
// 
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0
alphaStack.add(0, alpha)
alpha *= 0.4064171f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
withTransform({
transform(
Matrix(values=floatArrayOf(
2.4600489139556885f, 0.0f, 0.0f, 0.0f,
0.0f, 2.4600489139556885f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
-49.40945816040039f, -67.96373748779297f, 0.0f, 1.0f)
))}){
// _0_0_0
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(36.769554f, 44.565483f)
    cubicTo(36.780075f, 45.361816f, 35.53091f, 46.099186f, 33.495064f, 46.498383f)
    cubicTo(31.459217f, 46.89758f, 28.947906f, 46.89758f, 26.91206f, 46.498383f)
    cubicTo(24.876213f, 46.099186f, 23.627047f, 45.361816f, 23.63757f, 44.565483f)
    cubicTo(23.627047f, 43.76915f, 24.876213f, 43.03178f, 26.91206f, 42.632584f)
    cubicTo(28.947906f, 42.233387f, 31.459217f, 42.233387f, 33.495064f, 42.632584f)
    cubicTo(35.53091f, 43.03178f, 36.780075f, 43.76915f, 36.769554f, 44.565483f)
    close()
}
shape = Outline.Generic(generalPath!!)
brush = Brush.radialGradient(0.0f to Color(0, 0, 0, 255), 1.0f to Color(0, 0, 0, 0), center = Offset(30.203562f, 44.565502f), radius = 6.5659924f, tileMode = TileMode.Clamp)
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
}
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0_1
shape = Outline.Rounded(roundRect = RoundRect(left = 4.414728164672852f, top = 3.5233452320098877f, right = 44.47665214538574f, bottom = 43.58526921272278f,radiusX = 10.909647941589355f, radiusY = 10.909647941589355f))
brush = Brush.radialGradient(0.0f to Color(255, 255, 255, 255), 1.0f to Color(220, 220, 220, 255), center = Offset(24.445688f, 35.878155f), radius = 40.960464f, tileMode = TileMode.Clamp)
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
brush = SolidColor(Color(155, 155, 155, 255))
stroke = Stroke(width=1.0f, cap=StrokeCap.Butt, join=StrokeJoin.Bevel, miter=10.0f)
shape = Outline.Rounded(roundRect = RoundRect(left = 4.414728164672852f, top = 3.5233452320098877f, right = 44.47665214538574f, bottom = 43.58526921272278f,radiusX = 10.909647941589355f, radiusY = 10.909647941589355f))
drawOutline(outline = shape!!, style = stroke!!, brush=brush!!, alpha = alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0_2
brush = SolidColor(Color(255, 255, 255, 255))
stroke = Stroke(width=0.99999976f, cap=StrokeCap.Butt, join=StrokeJoin.Bevel, miter=10.0f)
shape = Outline.Rounded(roundRect = RoundRect(left = 5.597388744354248f, top = 4.70600700378418f, right = 43.29397535324097f, bottom = 42.4025936126709f,radiusX = 8.485278129577637f, radiusY = 8.485278129577637f))
drawOutline(outline = shape!!, style = stroke!!, brush=brush!!, alpha = alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0_3
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(19.187523f, 7.5673065f)
    lineTo(16.902367f, 15.512619f)
    lineTo(16.644554f, 16.579025f)
    cubicTo(16.621107f, 16.68059f, 16.60939f, 16.766527f, 16.609398f, 16.836838f)
    cubicTo(16.60939f, 16.96184f, 16.648453f, 17.071215f, 16.726585f, 17.164963f)
    cubicTo(16.789078f, 17.235275f, 16.867203f, 17.270432f, 16.96096f, 17.270432f)
    cubicTo(17.062513f, 17.270432f, 17.195328f, 17.207932f, 17.359398f, 17.082932f)
    cubicTo(17.664076f, 16.85637f, 18.070326f, 16.38762f, 18.578148f, 15.676682f)
    lineTo(18.976585f, 15.957932f)
    cubicTo(18.437513f, 16.770433f, 17.882826f, 17.391525f, 17.312523f, 17.821213f)
    cubicTo(16.742203f, 18.243088f, 16.214859f, 18.454025f, 15.730492f, 18.454025f)
    cubicTo(15.394547f, 18.454025f, 15.140641f, 18.368088f, 14.968773f, 18.196213f)
    cubicTo(14.804704f, 18.03215f, 14.722673f, 17.789963f, 14.72268f, 17.46965f)
    cubicTo(14.722673f, 17.08684f, 14.80861f, 16.582933f, 14.980492f, 15.957932f)
    lineTo(15.226586f, 15.079025f)
    cubicTo(14.203142f, 16.414965f, 13.261737f, 17.348557f, 12.402367f, 17.879807f)
    cubicTo(11.785176f, 18.262619f, 11.179708f, 18.454025f, 10.585961f, 18.454025f)
    cubicTo(10.015646f, 18.454025f, 9.523459f, 18.21965f, 9.109399f, 17.7509f)
    cubicTo(8.695335f, 17.27434f, 8.488304f, 16.621996f, 8.488305f, 15.793869f)
    cubicTo(8.488304f, 14.551685f, 8.859398f, 13.243093f, 9.601586f, 11.868088f)
    cubicTo(10.351583f, 10.485283f, 11.300801f, 9.379815f, 12.449242f, 8.5516815f)
    cubicTo(13.347674f, 7.895442f, 14.19533f, 7.567317f, 14.992211f, 7.5673065f)
    cubicTo(15.468766f, 7.567317f, 15.863297f, 7.692317f, 16.175804f, 7.9423065f)
    cubicTo(16.496109f, 8.192317f, 16.738297f, 8.606379f, 16.902367f, 9.184494f)
    lineTo(17.324242f, 7.8485565f)
    lineTo(19.187523f, 7.5673065f)
    moveTo(15.015648f, 8.1766815f)
    cubicTo(14.515642f, 8.176692f, 13.984392f, 8.411066f, 13.421898f, 8.8798065f)
    cubicTo(12.625019f, 9.543878f, 11.914082f, 10.528252f, 11.289086f, 11.832932f)
    cubicTo(10.671896f, 13.137624f, 10.363302f, 14.31731f, 10.363305f, 15.371994f)
    cubicTo(10.363302f, 15.903246f, 10.496115f, 16.32512f, 10.761742f, 16.637619f)
    cubicTo(11.027364f, 16.942308f, 11.332051f, 17.09465f, 11.675805f, 17.09465f)
    cubicTo(12.527363f, 17.09465f, 13.453143f, 16.465746f, 14.453148f, 15.207932f)
    cubicTo(15.789078f, 13.536061f, 16.457047f, 11.821219f, 16.457054f, 10.0634f)
    cubicTo(16.457047f, 9.399346f, 16.32814f, 8.918879f, 16.070335f, 8.621994f)
    cubicTo(15.812515f, 8.325129f, 15.460953f, 8.176692f, 15.015648f, 8.1766815f)
}
shape = Outline.Generic(generalPath!!)
brush = SolidColor(Color(0, 0, 0, 255))
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0_4
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(23.843164f, 20.148026f)
    lineTo(23.843164f, 26.056417f)
    cubicTo(24.570492f, 25.30076f, 25.31199f, 24.724564f, 26.067669f, 24.327824f)
    cubicTo(26.82333f, 23.921665f, 27.758469f, 23.718578f, 28.87309f, 23.718563f)
    cubicTo(30.157719f, 23.718578f, 31.281775f, 24.02557f, 32.245266f, 24.639536f)
    cubicTo(33.218178f, 25.244085f, 33.969124f, 26.127274f, 34.498108f, 27.289103f)
    cubicTo(35.036507f, 28.44151f, 35.305714f, 29.81116f, 35.30573f, 31.398058f)
    cubicTo(35.305714f, 32.56935f, 35.15458f, 33.64618f, 34.85233f, 34.628544f)
    cubicTo(34.55949f, 35.601475f, 34.129704f, 36.446877f, 33.562965f, 37.16476f)
    cubicTo(32.9962f, 37.88265f, 32.306652f, 38.439953f, 31.49432f, 38.83668f)
    cubicTo(30.691408f, 39.22396f, 29.803497f, 39.417603f, 28.830585f, 39.417603f)
    cubicTo(28.235485f, 39.417603f, 27.673456f, 39.346756f, 27.144497f, 39.20507f)
    cubicTo(26.624966f, 39.06338f, 26.18101f, 38.87919f, 25.81263f, 38.652485f)
    cubicTo(25.444233f, 38.41634f, 25.127796f, 38.17547f, 24.86332f, 37.92988f)
    cubicTo(24.608274f, 37.684284f, 24.268223f, 37.3159f, 23.843164f, 36.82471f)
    lineTo(23.843164f, 37.207268f)
    cubicTo(23.843159f, 37.9346f, 23.668411f, 38.487183f, 23.318918f, 38.865017f)
    cubicTo(22.969418f, 39.233406f, 22.525461f, 39.417603f, 21.987051f, 39.417603f)
    cubicTo(21.439188f, 39.417603f, 20.999954f, 39.233406f, 20.669352f, 38.865017f)
    cubicTo(20.34819f, 38.487183f, 20.18761f, 37.9346f, 20.187613f, 37.207268f)
    lineTo(20.187613f, 20.31805f)
    cubicTo(20.18761f, 19.534063f, 20.343468f, 18.943695f, 20.655184f, 18.54695f)
    cubicTo(20.976341f, 18.140799f, 21.420296f, 17.937712f, 21.987051f, 17.93769f)
    cubicTo(22.582136f, 17.937712f, 23.04026f, 18.131351f, 23.361425f, 18.518612f)
    cubicTo(23.68258f, 18.896467f, 23.843159f, 19.439604f, 23.843164f, 20.148026f)
    moveTo(24.02736f, 31.638927f)
    cubicTo(24.027353f, 33.178608f, 24.37685f, 34.364063f, 25.075851f, 35.195297f)
    cubicTo(25.784285f, 36.01709f, 26.709978f, 36.427986f, 27.852938f, 36.427982f)
    cubicTo(28.825851f, 36.427986f, 29.66181f, 36.007645f, 30.360815f, 35.166958f)
    cubicTo(31.069244f, 34.316837f, 31.423464f, 33.103043f, 31.423475f, 31.525576f)
    cubicTo(31.423464f, 30.50543f, 31.277052f, 29.626966f, 30.984243f, 28.890179f)
    cubicTo(30.691408f, 28.153412f, 30.275791f, 27.58666f, 29.737389f, 27.18992f)
    cubicTo(29.198963f, 26.78376f, 28.570812f, 26.580675f, 27.852938f, 26.580664f)
    cubicTo(27.11615f, 26.580675f, 26.459663f, 26.78376f, 25.883472f, 27.18992f)
    cubicTo(25.307268f, 27.58666f, 24.853867f, 28.16758f, 24.523268f, 28.932686f)
    cubicTo(24.192656f, 29.688364f, 24.027353f, 30.590443f, 24.02736f, 31.638927f)
}
shape = Outline.Generic(generalPath!!)
brush = SolidColor(Color(0, 0, 0, 255))
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0_5
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(39.201935f, 12.649522f)
    cubicTo(39.201927f, 12.84475f, 39.18891f, 13.13107f, 39.16289f, 13.508484f)
    cubicTo(39.149868f, 13.8729f, 39.14336f, 14.139699f, 39.143368f, 14.308881f)
    lineTo(36.41031f, 14.308881f)
    lineTo(36.41031f, 11.907691f)
    cubicTo(36.4103f, 11.439177f, 36.15001f, 11.204915f, 35.629433f, 11.204904f)
    cubicTo(35.108845f, 11.204915f, 34.848553f, 11.439177f, 34.848557f, 11.907691f)
    lineTo(34.848557f, 19.618828f)
    cubicTo(34.848553f, 20.100368f, 35.108845f, 20.341139f, 35.629433f, 20.341137f)
    cubicTo(36.15001f, 20.341139f, 36.4103f, 20.100368f, 36.41031f, 19.618828f)
    lineTo(36.41031f, 17.061464f)
    lineTo(39.143368f, 17.061464f)
    lineTo(39.143368f, 19.560263f)
    cubicTo(39.14336f, 20.328123f, 38.726894f, 20.913778f, 37.89397f, 21.31723f)
    cubicTo(37.23022f, 21.642595f, 36.475376f, 21.805277f, 35.629433f, 21.805277f)
    cubicTo(34.770466f, 21.805277f, 34.01562f, 21.642595f, 33.364895f, 21.31723f)
    cubicTo(32.531963f, 20.913778f, 32.115498f, 20.328123f, 32.115498f, 19.560263f)
    lineTo(32.115498f, 12.044344f)
    cubicTo(32.115498f, 10.599737f, 33.286808f, 9.877429f, 35.629433f, 9.877418f)
    cubicTo(36.80074f, 9.877429f, 37.6597f, 10.053126f, 38.206318f, 10.404508f)
    cubicTo(38.870056f, 10.833999f, 39.201927f, 11.582337f, 39.201935f, 12.649522f)
}
shape = Outline.Generic(generalPath!!)
brush = SolidColor(Color(0, 0, 0, 255))
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)

}
}



    private fun innerPaint(drawScope: DrawScope) {
	    _paint0(drawScope)


	    shape = null
	    generalPath = null
	    brush = null
	    stroke = null
	    clip = null
	    alpha = 1.0f
	}
	
    companion object {
        /**
         * Returns the X of the bounding box of the original SVG image.
         *
         * @return The X of the bounding box of the original SVG image.
         */
        fun getOrigX(): Double {
            return 3.9147281646728516
        }

        /**
         * Returns the Y of the bounding box of the original SVG image.
         *
         * @return The Y of the bounding box of the original SVG image.
         */
        fun getOrigY(): Double {
            return 3.0233452320098877
        }

        /**
         * Returns the width of the bounding box of the original SVG image.
         *
         * @return The width of the bounding box of the original SVG image.
         */
        fun getOrigWidth(): Double {
            return 41.06192398071289
        }

        /**
         * Returns the height of the bounding box of the original SVG image.
         *
         * @return The height of the bounding box of the original SVG image.
         */
        fun getOrigHeight(): Double {
            return 44.13774490356445
        }

        
    }

    override val intrinsicSize: Size
        get() = Size.Unspecified

    override fun DrawScope.onDraw() {
        clipRect {
            // Use the original icon bounding box and the current icon dimension to compute
            // the scaling factor
            val fullOrigWidth = getOrigX() + getOrigWidth()
            val fullOrigHeight = getOrigY() + getOrigHeight()
            val coef1 = size.width / fullOrigWidth
            val coef2 = size.height / fullOrigHeight
            val coef = min(coef1, coef2).toFloat()

            // Use the original icon bounding box and the current icon dimension to compute
            // the offset pivot for the scaling
            var translateX = -getOrigX()
            var translateY = -getOrigY()
            if (coef1 != coef2) {
                if (coef1 < coef2) {
                    val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
                    translateY += extraDy
                } else {
                    val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
                    translateX += extraDx
                }
            }
            val translateXDp = translateX.toFloat().toDp().value
            val translateYDp = translateY.toFloat().toDp().value

            // Create a combined scale + translate + clip transform before calling the transcoded painting instructions
            withTransform({
                scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
                translate(translateXDp, translateYDp)
                clipRect(left = 0.0f, top = 0.0f, right = fullOrigWidth.toFloat(), bottom = fullOrigHeight.toFloat(), clipOp = ClipOp.Intersect)
            }) {
                innerPaint(this)
            }
        }
    }
}

